from aicenter.models import create_tables
from ._engine import get_db, Session, translation


# noinspection PyUnusedLocal
@translation
def _insert_basic_data(session: Session):
    pass


def migration():
    """
    迁移数据库
    """
    # 获取数据库连接
    engine = get_db()
    # 创建表
    create_tables(engine=engine)
    # 初始化基础数据
    _insert_basic_data()
